GXGetShapeLocalBounds
You can use theGXGetShapeLocalBounds
function to determine the bounding rectangle of a shape in local coordinates.
gxRectangle *GXGetShapeLocalBounds(gxShape source, gxRectangle *bounds);
- source
- A reference to the shape whose bounding rectangle you wish to determine in local coordinates.
bounds
- A pointer to a rectangle structure. On return, it contains the dimensions of the bounding rectangle.
- function result
- A rectangle that defines the bounds of the shape in local coordinates. (It is the same as the rectangle returned in the
bounds
parameter.)DESCRIPTION
TheGXGetShapeLocalBounds
function returns the bounding rectangle of the source shape after the shape's transform mapping and style have been applied. The dimensions of the rectangle are in the shape's local coordinates. The rectangle pointed to by thebounds
parameter also receives the bounding rectangle in local coordinates.To determine a shape's bounding rectangle in geometry-space coordinates, use the
GXGetShapeBounds
function. To determine a shape's bounding rectangle in global coordinates, use theGXGetShapeGlobalBounds
function. To determine a shape's bounding rectangle on a view device, use theGXGetShapeDeviceBounds
function.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil (debugging version) SEE ALSO
For an example of the use of this function, see Listing 7-8 on page 7-51.The
GXGetShapeBounds
function is described in the geometric operations chapter of Inside Macintosh: QuickDraw GX Graphics. TheGXGetShapeGlobalBounds
function is described on page 7-125. TheGXGetShapeDeviceBounds
function is described on page 7-116.For information about coordinate spaces, see the section "About Drawing, Coordinate Conversion, and Clipping" beginning on page 7-30.